home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / etc / init.d / vbesave < prev    next >
Text File  |  2008-10-14  |  820b  |  43 lines

  1. #!/bin/sh
  2.  
  3. test -x /usr/sbin/vbetool || exit 0
  4. set -e
  5.  
  6. . /lib/lsb/init-functions
  7.  
  8. test -f /etc/default/rcS && . /etc/default/rcS
  9. test -f /etc/default/acpi-support && . /etc/default/acpi-support
  10. test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
  11.  
  12. case "$1" in
  13.  start)
  14.     if laptop-detect > /dev/null; then
  15.         LAPTOP=true;
  16.     fi
  17.  
  18.     if [ x$LAPTOP != xtrue ]; then
  19.         exit 0;
  20.     fi
  21.  
  22.         DeviceConfig
  23.     log_begin_msg "Saving VESA state..."
  24.     if [ "$SAVE_VBE_STATE" = "true" ]; then
  25.         if [ "$VERBOSE" = no ]; then 
  26.         if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
  27.             log_end_msg $?
  28.             exit 1
  29.         fi
  30.         else
  31.         if ! vbetool vbestate save > $VBESTATE ; then
  32.             log_end_msg $?
  33.             exit 1
  34.         fi
  35.         fi
  36.         log_end_msg 0
  37.         fi
  38.         ;;
  39.  *)
  40.         exit 0
  41.         ;;
  42. esac
  43.